<template>
  <el-dialog
    title="策略详情"
    :visible="daiLogTableValue"
    width="40%"
    @close="closeDialog"
  >
    <el-form ref="form" :model="form" label-width="100px">
      <el-form-item label="策略名称:">
        <span>{{ policyName }}</span>
      </el-form-item>
      <el-form-item label="策略方案:">
        <el-table
          :data="tableData"
          stripe
          style="width: 100%"
        >
          <el-table-column
            type="index"
            label="序号"
          />
          <el-table-column
            prop="nodeName"
            label="点位名称"
          />
          <el-table-column
            prop="innerCode"
            label="设备编号"
          />
        </el-table>
        <!-- <Pagination /> -->
      </el-form-item>
    </el-form>
  </el-dialog>
</template>
<script>
import { getTacticsDetailRequest } from '../../../api/tactics.js'
export default {
  name: '',
  props: {

  },
  data() {
    return {
      form: {},
      tableData: [],
      daiLogTableValue: false,
      policyName: ''
    }
  },
  computed: {
  },
  created() {
  },
  methods: {
    // 打开对话框
    async openDialog(id, policyName) {
      this.daiLogTableValue = true
      this.policyName = policyName
      // 发送详情请求
      const res = await getTacticsDetailRequest(id)
      console.log(res, 'detail')
      this.tableData = res.data.currentPageRecords
    },

    // 关闭对话框
    closeDialog() {
      this.daiLogTableValue = false
    }
  }
}
</script>
<style lang='scss'  scoped>

</style>
